/* 智能工具推荐组件样式 */

.smart-tool-recommendation {
  background: #ffffff;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 16px;
  margin: 16px 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 推荐标题区域 */
.recommendation-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.header-left {
  flex: 1;
}

.recommendation-title {
  margin: 0 0 8px 0;
  font-size: 16px;
  font-weight: 600;
  color: #2c3e50;
  display: flex;
  align-items: center;
  gap: 8px;
}

.match-count {
  font-size: 14px;
  color: #6c757d;
  font-weight: normal;
}

/* 置信度指示器 */
.confidence-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.confidence-label {
  font-size: 12px;
  color: #6c757d;
}

.confidence-bar {
  width: 60px;
  height: 4px;
  background: #e9ecef;
  border-radius: 2px;
  overflow: hidden;
}

.confidence-fill {
  height: 100%;
  transition: width 0.3s ease;
}

.confidence-value {
  font-size: 12px;
  font-weight: 600;
}

.expand-toggle {
  background: none;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 12px;
  color: #6c757d;
  cursor: pointer;
  transition: all 0.2s ease;
}

.expand-toggle:hover {
  background: #f8f9fa;
  border-color: #adb5bd;
}

/* 推理说明 */
.reasoning-text {
  background: #f8f9fa;
  border-left: 3px solid #17a2b8;
  padding: 8px 12px;
  margin-bottom: 16px;
  font-size: 14px;
  color: #495057;
  border-radius: 0 4px 4px 0;
}

.reasoning-icon {
  margin-right: 6px;
}

/* 相关分类 */
.related-categories {
  margin-bottom: 16px;
}

.categories-label {
  font-size: 14px;
  color: #6c757d;
  margin-bottom: 8px;
  font-weight: 500;
}

.categories-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-chip {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 16px;
  padding: 4px 12px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.category-chip:hover {
  background: #e9ecef;
  border-color: #adb5bd;
}

.category-chip.selected {
  background: #007bff;
  border-color: #007bff;
  color: white;
}

.category-icon {
  font-size: 14px;
}

.category-name {
  font-weight: 500;
}

.category-score {
  color: #6c757d;
  font-size: 11px;
}

.category-chip.selected .category-score {
  color: rgba(255, 255, 255, 0.8);
}

/* 推荐工具列表 */
.recommendations-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.recommendation-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  padding: 12px;
  transition: all 0.2s ease;
}

.recommendation-item:hover {
  background: #ffffff;
  border-color: #007bff;
  box-shadow: 0 2px 8px rgba(0, 123, 255, 0.1);
}

.tool-info {
  flex: 1;
  margin-right: 12px;
}

.tool-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.tool-name {
  font-weight: 600;
  color: #2c3e50;
  font-size: 14px;
}

.tool-score {
  font-size: 12px;
  font-weight: 600;
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 10px;
}

.tool-description {
  font-size: 13px;
  color: #6c757d;
  line-height: 1.4;
  margin-bottom: 8px;
}

/* 匹配原因标签 */
.match-reasons {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.reason-tag {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 10px;
  font-weight: 500;
}

.reason-category {
  background: #e3f2fd;
  color: #1976d2;
}

.reason-name {
  background: #f3e5f5;
  color: #7b1fa2;
}

.reason-description {
  background: #e8f5e8;
  color: #388e3c;
}

.reason-keywords {
  opacity: 0.8;
  font-weight: normal;
}

/* 工具操作按钮 */
.tool-actions {
  display: flex;
  align-items: center;
}

.select-tool-btn {
  background: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.select-tool-btn:hover:not(:disabled) {
  background: #0056b3;
  transform: translateY(-1px);
}

.select-tool-btn:disabled {
  background: #6c757d;
  cursor: not-allowed;
  opacity: 0.6;
}

.select-tool-btn.small {
  padding: 4px 8px;
  font-size: 11px;
}

/* 无推荐状态 */
.no-recommendations {
  text-align: center;
  padding: 24px;
  color: #6c757d;
}

.no-recommendations-icon {
  font-size: 32px;
  margin-bottom: 12px;
}

.no-recommendations-text {
  font-size: 14px;
  line-height: 1.5;
}

.no-recommendations-text ul {
  text-align: left;
  display: inline-block;
  margin-top: 8px;
}

.no-recommendations-text li {
  margin-bottom: 4px;
}

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 32px;
  color: #adb5bd;
}

.empty-state-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.empty-state-text {
  font-size: 16px;
}

/* 分类工具展示 */
.category-tools {
  margin-top: 20px;
  border-top: 1px solid #e9ecef;
  padding-top: 16px;
}

.category-tools-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.category-title {
  font-weight: 600;
  color: #2c3e50;
}

.tools-count {
  font-size: 12px;
  color: #6c757d;
}

.category-tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.category-tool-item {
  background: #ffffff;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  padding: 12px;
  transition: all 0.2s ease;
}

.category-tool-item:hover {
  border-color: #007bff;
  box-shadow: 0 2px 8px rgba(0, 123, 255, 0.1);
}

.category-tool-item .tool-name {
  font-size: 13px;
  margin-bottom: 6px;
}

.category-tool-item .tool-description {
  font-size: 12px;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .smart-tool-recommendation {
    padding: 12px;
  }
  
  .recommendation-header {
    flex-direction: column;
    gap: 8px;
  }
  
  .confidence-indicator {
    justify-content: flex-start;
  }
  
  .categories-list {
    justify-content: flex-start;
  }
  
  .recommendation-item {
    flex-direction: column;
    gap: 8px;
  }
  
  .tool-info {
    margin-right: 0;
  }
  
  .tool-actions {
    align-self: flex-end;
  }
  
  .category-tools-grid {
    grid-template-columns: 1fr;
  }
}
